/**
 * Created by Administrator on 2015/12/22.
 */
var Promise = require('promise');
var logger = require('log4js').getLogger('commentService');
var commentDao = require('../dao/CommentDao');
var commentService = {};

commentService.queryForPage = function(articleId,type,pageNo,pageSize){
    var params = {};
    params.articleId = articleId;
    params.bak1 = type;
    params.bak2 = 0;
    return commentDao.getByPage(params,pageNo,pageSize,'create_time desc');
}
commentService.delete = function(id){
    return commentDao.delete(id);
}

commentService.getById = function (id) {
    return commentDao.getById(id);
}

module.exports = commentService;